
{%include file="header.html" %}  

<div class="break"></div>

<div class="warp manage_page">

{%include file="user/user_manage_menu.html" menu='user_info' menu_detail='user_edit' %} 


<div class="manage_body">
<form id="form1">
<div class="manage_body_content ">

	<h3>用户信息</h3>
	<div class="user_edit_body info_tab01">
	<table>
    <tbody><tr>
    <th class="gray6">登录名：</th>
    <td colspan="2" class="font_12">
	<em>{%$g_show.current_user_info.user_name%}</em>
	</td>
    </tr>    
   <tr>
    <th class="gray6"><em class="error_color">*</em> 昵&nbsp;&nbsp;称：</th>
    <td>
    <input type="text" id="user_nickname" name="user_nickname" value="{%$g_show.current_user_info.user_nickname%}" class="PY_input"><span style="display:none" class="co_kd2"></span>
    <input type="hidden" name="oldnick" value="{%$g_show.current_user_info.user_nickname%}" id="oldnick">
    </td>
    <td id="red_nickname">
	仅支持中英文，数字，_或-
    </td>
   </tr>
   <tr>
    <th class="gray6">真实姓名：</th>
    <td>
	 <input type="text" value="{%$g_show.current_user_info.user_realname%}" id="user_realname" name="user_realname" class="PY_input">
    </td>
    <td id="red_realname">
    </td>
   </tr>
   <tr>
    <th class="gray6"><em class="error_color">*</em> 所在地：</th>
    <td class="info_tab_vm">
    <select defvalue="11" id="province" name="province"><option value="34">安徽</option><option value="11">北京</option><option value="50">重庆</option><option value="35">福建</option><option value="62">甘肃</option><option value="44">广东</option><option value="45">广西</option><option value="52">贵州</option><option value="46">海南</option><option value="13">河北</option><option value="23">黑龙江</option><option value="41">河南</option><option value="42">湖北</option><option value="43">湖南</option><option value="15">内蒙古</option><option value="32">江苏</option><option value="36">江西</option><option value="22">吉林</option><option value="21">辽宁</option><option value="64">宁夏</option><option value="63">青海</option><option value="14">山西</option><option value="37">山东</option><option value="31">上海</option><option value="51">四川</option><option value="12">天津</option><option value="54">西藏</option><option value="65">新疆</option><option value="53">云南</option><option value="33">浙江</option><option value="61">陕西</option><option value="71">台湾</option><option value="81">香港</option><option value="82">澳门</option><option value="400">海外</option><option value="100">其他</option></select> 
    
    <span style="display:none" class="co_kd2"></span></td>
    <td id="red_prov">
    </td>  
   </tr>
   <tr>
    <th class="gray6"><em class="error_color">*</em> 性&nbsp;&nbsp;别：</th>
    <td class="info_tab_vm"><input type="radio" checked="checked" class="sex" value="1" name="sex"><label for="man">男</label>&nbsp;&nbsp;&nbsp;&nbsp;<input type="radio" class="sex" value="0" name="sex" ><label for="woman">女</label><span id="" class="co_kd2" style="display:none"></span></td>
    <td>
    </td>
   </tr>
  

   <tr>
    <th class="gray6">一句话介绍：</th>
    <td><textarea class="info_txtarea" id="desc" name="desc">{%$g_show.current_user_info.desc%}</textarea><span style="display:none" class="co_kd2"></span></td>
    <td id="red_mydesc">
    </td>
   </tr>

	
	<tr>
    <th class="gray6">老密码：</th>
    <td>
	 <input type="password" value="" id="oldpassword" name="oldpassword" class="PY_input">
    </td>
    <td id="red_realname">修改密码需要输入老密码
    </td>
   </tr>
	
	<tr>
    <th class="gray6">新密码：</th>
    <td>
	 <input type="password" value="" id="password" name="password" class="PY_input">
	
    </td>
    <td id="red_realname">
    </td>
   </tr>

   <tr>
    <th class="gray6">重新输入：</th>
    <td>
	 <input type="password" value="" id="re_password" name="re_password" class="PY_input"><br>
	
    </td>
    <td id="red_realname">
    </td>
   </tr>


   <tr>
    <th></th>
    <td><div class="MIB_btn">  <input type="button" value="保存" id="save_btn" class="u_bnt upload_submit"> </div></td>
    <td></td>
   </tr>
  
   
   
    </tbody></table>


</div>
</div>
</form>
<div class="break"></div>




<script src ="/js/common/user_message.js"></script>
<script type="text/javascript" language="javascript">

YOUXIXIU.MAIN.CheckMessage.init();


$("#province").find("option[value='{%$g_show.current_user_info.province%}']").attr("selected",true);
$(".sex[value='{%$g_show.current_user_info.sex%}']").attr("checked","checked");

$("#save_btn").bind("click",function(){

	$.ajax({
		url:"/interface/user/json_user_edit_post.php",
		type:"post",
		data:$("#form1").serialize(),
		dataType:"json",
    complete:function(xhr,status){
      var result = eval("("+(xhr.responseText)+")");
			
			if(result.error == "0"){
			alert("成功");
				location.reload();                   
			}else{
				var errmsg = result.errmsg;
				alert(errmsg)
			}

			widget = null;
		}
	});
});

</script>



</div>
</div>


{%include file="footer.html" %}  
